<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import {travelGuideApi} from '@/feature/mj/infra/api/travelGuideApi'
import CURDTable from '@/framework/components/table/CURDTable'
import YesNoEnum from "@/infra/constant/YesNoEnum";

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: travelGuideApi,
        showSelection: false,
        dialogWidth: '600px',
        columns: [
          {
            label: '导游头像',
            required: true,
            span: 12,
            prop: 'guideLogo',
            type: ColumnType.IMAGE,
            width: 80
          },
          {
            label: '导游小图',
            required: true,
            span: 12,
            prop: 'littleLogo',
            type: ColumnType.IMAGE,
            width: 80
          }, {
            label: '导游名称',
            searchable: true,
            required: true,
            span: 12,
            prop: 'guideName'
          }, {
            label: '是否默认导游',
            searchable: true,
            required: true,
            span: 12,
            type: ColumnType.RADIO,
            prop: 'defaultFlag',
            options: YesNoEnum
          },
          // {
          //   label: '导游电话',
          //   prop: 'guidePhone'
          // },
          {
            label: '导游简介',
            required: true,
            span: 24,
            prop: 'guideIntro',
            width: 'auto',
            type: ColumnType.TEXTAREA
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

